package com.ems.service.impl;

import com.ems.entity.TProduct;
import com.ems.entity.TRoler;
import com.ems.entity.TUser;
import com.ems.mapper.TProductMapper;
import com.ems.mapper.TRolerMapper;
import com.ems.mapper.TUserMapper;
import com.ems.service.TRolerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ZZH
 * @since 2022-06-27
 */
@Service
public class TRolerServiceImpl extends ServiceImpl<TRolerMapper, TRoler> implements TRolerService {
    @Autowired
    TRolerMapper tRolerMapper;

    //增
    @Override
    public Boolean add(TRoler tRoler){
        baseMapper.add(tRoler);
        return true;
    }

    //删
    @Override
    public Boolean delete(Integer id){
        baseMapper.delete(id);
        return true;
    }

    //改
    @Override
    public Boolean update(TRoler tRoler){
        baseMapper.update(tRoler);
        return true;
    }

    //查单
    @Override
    public TRoler findOne(Integer id){
        return baseMapper.findOne(id);
    }


    //查全
    @Override
    public List<TRoler> findAll(){
        return baseMapper.findAll();
    }
}
